package erfgame.core.entity;

import java.util.ArrayList;
import java.util.List;

public abstract class AbstractStatefulPhysicalActiveEntity 
	extends AbstractStatefulPhysicalEntity 
	implements Active{

	private static final long serialVersionUID = 0;


	private transient ArrayList<Activity> activities;
	
	public AbstractStatefulPhysicalActiveEntity( long id, EntityType entityType ) {
		super(id,entityType);
		this.activities = new ArrayList<Activity>(3);
	}

	public boolean addActivity(Activity activity) {
		// TODO result of serialization, remove when custom object writing implemented
		if( activities == null ) {
			activities = new ArrayList<Activity>();
		}
		return this.activities.add(activity);
	}

	public List<Activity> getActivities() {
		return this.activities;
	}

	public boolean removeActivity(Activity activity) {
		return this.activities.remove(activity);
	}
}
